Optimal. Leaf size=115 \[ \frac {a+b \log \left (c x^n\right )}{4 d \left (d+e x^2\right )^2}-\frac {\log \left (1+\frac {d}{e x^2}\right ) \left (4 a-3 b n+4 b \log \left (c x^n\right )\right )}{8 d^3}+\frac {4 a-b n+4 b \log \left (c x^n\right )}{8 d^2 \left (d+e x^2\right )}+\frac {b n \text {Li}_2\left (-\frac {d}{e x^2}\right )}{4 d^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.16, antiderivative size = 115, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {2385, 2379,
2438} \begin {gather*} \frac {b n \text {PolyLog}\left (2,-\frac {d}{e x^2}\right )}{4 d^3}-\frac {\log \left (\frac {d}{e x^2}+1\right ) \left (4 a+4 b \log \left (c x^n\right )-3 b n\right )}{8 d^3}+\frac {4 a+4 b \log \left (c x^n\right )-b n}{8 d^2 \left (d+e x^2\right )}+\frac {a+b \log \left (c x^n\right )}{4 d \left (d+e x^2\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2379
Rule 2385
Rule 2438
Rubi steps
\begin {align*} \int \frac {a+b \log \left (c x^n\right )}{x \left (d+e x^2\right )^3} \, dx &=\frac {a+b \log \left (c x^n\right )}{4 d \left (d+e x^2\right )^2}-\frac {\int \frac {-4 a+b n-4 b \log \left (c x^n\right )}{x \left (d+e x^2\right )^2} \, dx}{4 d}\\ &=\frac {a+b \log \left (c x^n\right )}{4 d \left (d+e x^2\right )^2}+\frac {4 a-b n+4 b \log \left (c x^n\right )}{8 d^2 \left (d+e x^2\right )}+\frac {\int \frac {-4 b n-2 (-4 a+b n)+8 b \log \left (c x^n\right )}{x \left (d+e x^2\right )} \, dx}{8 d^2}\\ &=\frac {a+b \log \left (c x^n\right )}{4 d \left (d+e x^2\right )^2}-\frac {\log \left (1+\frac {d}{e x^2}\right ) \left (4 a-3 b n+4 b \log \left (c x^n\right )\right )}{8 d^3}+\frac {4 a-b n+4 b \log \left (c x^n\right )}{8 d^2 \left (d+e x^2\right )}+\frac {(b n) \int \frac {\log \left (1+\frac {d}{e x^2}\right )}{x} \, dx}{2 d^3}\\ &=\frac {a+b \log \left (c x^n\right )}{4 d \left (d+e x^2\right )^2}-\frac {\log \left (1+\frac {d}{e x^2}\right ) \left (4 a-3 b n+4 b \log \left (c x^n\right )\right )}{8 d^3}+\frac {4 a-b n+4 b \log \left (c x^n\right )}{8 d^2 \left (d+e x^2\right )}+\frac {b n \text {Li}_2\left (-\frac {d}{e x^2}\right )}{4 d^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.68, size = 396, normalized size = 3.44 \begin {gather*} \frac {\frac {4 d^2 \left (a-b n \log (x)+b \log \left (c x^n\right )\right )}{\left (d+e x^2\right )^2}+\frac {8 d \left (a-b n \log (x)+b \log \left (c x^n\right )\right )}{d+e x^2}+16 \log (x) \left (a-b n \log (x)+b \log \left (c x^n\right )\right )-8 \left (a-b n \log (x)+b \log \left (c x^n\right )\right ) \log \left (d+e x^2\right )-b n \left (\frac {d}{d-i \sqrt {d} \sqrt {e} x}+\frac {d}{d+i \sqrt {d} \sqrt {e} x}+2 \log (x)-\frac {d \log (x)}{\left (\sqrt {d}-i \sqrt {e} x\right )^2}-\frac {d \log (x)}{\left (\sqrt {d}+i \sqrt {e} x\right )^2}+\frac {5 \sqrt {e} x \log (x)}{-i \sqrt {d}+\sqrt {e} x}+\frac {5 \sqrt {e} x \log (x)}{i \sqrt {d}+\sqrt {e} x}-8 \log ^2(x)-6 \log \left (i \sqrt {d}-\sqrt {e} x\right )-6 \log \left (i \sqrt {d}+\sqrt {e} x\right )+8 \log (x) \log \left (1-\frac {i \sqrt {e} x}{\sqrt {d}}\right )+8 \log (x) \log \left (1+\frac {i \sqrt {e} x}{\sqrt {d}}\right )+8 \text {Li}_2\left (-\frac {i \sqrt {e} x}{\sqrt {d}}\right )+8 \text {Li}_2\left (\frac {i \sqrt {e} x}{\sqrt {d}}\right )\right )}{16 d^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.13, size = 841, normalized size = 7.31
method | result | size |
risch | \(\frac {b n \ln \left (x \right ) \ln \left (e \,x^{2}+d \right )}{2 d^{3}}-\frac {b n \ln \left (x \right ) \ln \left (\frac {-e x +\sqrt {-e d}}{\sqrt {-e d}}\right )}{2 d^{3}}+\frac {a \ln \left (x \right )}{d^{3}}-\frac {b n \dilog \left (\frac {-e x +\sqrt {-e d}}{\sqrt {-e d}}\right )}{2 d^{3}}-\frac {b n \dilog \left (\frac {e x +\sqrt {-e d}}{\sqrt {-e d}}\right )}{2 d^{3}}-\frac {b n}{8 d^{2} \left (e \,x^{2}+d \right )}+\frac {3 b n \ln \left (e \,x^{2}+d \right )}{8 d^{3}}+\frac {a}{2 d^{2} \left (e \,x^{2}+d \right )}-\frac {a \ln \left (e \,x^{2}+d \right )}{2 d^{3}}+\frac {a}{4 d \left (e \,x^{2}+d \right )^{2}}+\frac {i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (x \right )}{2 d^{3}}+\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{8 d \left (e \,x^{2}+d \right )^{2}}+\frac {i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{4 d^{2} \left (e \,x^{2}+d \right )}+\frac {b \ln \left (x^{n}\right )}{4 d \left (e \,x^{2}+d \right )^{2}}+\frac {b \ln \left (x^{n}\right )}{2 d^{2} \left (e \,x^{2}+d \right )}-\frac {b \ln \left (x^{n}\right ) \ln \left (e \,x^{2}+d \right )}{2 d^{3}}-\frac {i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{4 d^{2} \left (e \,x^{2}+d \right )}+\frac {i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3} \ln \left (e \,x^{2}+d \right )}{4 d^{3}}+\frac {b \ln \left (c \right )}{4 d \left (e \,x^{2}+d \right )^{2}}+\frac {b \ln \left (c \right )}{2 d^{2} \left (e \,x^{2}+d \right )}-\frac {b \ln \left (c \right ) \ln \left (e \,x^{2}+d \right )}{2 d^{3}}-\frac {i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3} \ln \left (x \right )}{2 d^{3}}-\frac {i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{8 d \left (e \,x^{2}+d \right )^{2}}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{8 d \left (e \,x^{2}+d \right )^{2}}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) \ln \left (x \right )}{2 d^{3}}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{4 d^{2} \left (e \,x^{2}+d \right )}+\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) \ln \left (e \,x^{2}+d \right )}{4 d^{3}}-\frac {b n \ln \left (x \right ) \ln \left (\frac {e x +\sqrt {-e d}}{\sqrt {-e d}}\right )}{2 d^{3}}+\frac {b \ln \left (x^{n}\right ) \ln \left (x \right )}{d^{3}}+\frac {b \ln \left (c \right ) \ln \left (x \right )}{d^{3}}-\frac {b n \ln \left (x \right )^{2}}{2 d^{3}}+\frac {i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{8 d \left (e \,x^{2}+d \right )^{2}}-\frac {3 b n \ln \left (x \right )}{4 d^{3}}+\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (x \right )}{2 d^{3}}-\frac {i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (e \,x^{2}+d \right )}{4 d^{3}}+\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{4 d^{2} \left (e \,x^{2}+d \right )}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (e \,x^{2}+d \right )}{4 d^{3}}\) | \(841\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 145.08, size = 403, normalized size = 3.50 \begin {gather*} - \frac {a e \left (\begin {cases} \frac {x^{2}}{2 d^{3}} & \text {for}\: e = 0 \\- \frac {1}{4 e \left (d + e x^{2}\right )^{2}} & \text {otherwise} \end {cases}\right )}{d} - \frac {a e \left (\begin {cases} \frac {x^{2}}{2 d^{2}} & \text {for}\: e = 0 \\- \frac {1}{2 d e + 2 e^{2} x^{2}} & \text {otherwise} \end {cases}\right )}{d^{2}} + \frac {a \log {\left (x \right )}}{d^{3}} - \frac {a \log {\left (d + e x^{2} \right )}}{2 d^{3}} + \frac {b e^{2} n \left (\begin {cases} - \frac {1}{2 e^{3} x^{2}} & \text {for}\: d = 0 \\- \frac {1}{4 d e^{2} + 4 e^{3} x^{2}} - \frac {\log {\left (d + e x^{2} \right )}}{4 d e^{2}} & \text {otherwise} \end {cases}\right )}{2 d^{2}} - \frac {b e^{2} \left (\begin {cases} \frac {1}{e^{3} x^{2}} & \text {for}\: d = 0 \\- \frac {1}{2 d \left (\frac {d}{x^{2}} + e\right )^{2}} & \text {otherwise} \end {cases}\right ) \log {\left (c x^{n} \right )}}{2 d^{2}} - \frac {b e n \left (\begin {cases} - \frac {1}{2 e^{2} x^{2}} & \text {for}\: d = 0 \\- \frac {\log {\left (d + e x^{2} \right )}}{2 d e} & \text {otherwise} \end {cases}\right )}{d^{2}} + \frac {b e \left (\begin {cases} \frac {1}{e^{2} x^{2}} & \text {for}\: d = 0 \\- \frac {1}{\frac {d^{2}}{x^{2}} + d e} & \text {otherwise} \end {cases}\right ) \log {\left (c x^{n} \right )}}{d^{2}} + \frac {b n \left (\begin {cases} - \frac {1}{2 e x^{2}} & \text {for}\: d = 0 \\\frac {\begin {cases} \frac {\operatorname {Li}_{2}\left (\frac {d e^{i \pi }}{e x^{2}}\right )}{2} & \text {for}\: \frac {1}{\left |{x}\right |} < 1 \wedge \left |{x}\right | < 1 \\\log {\left (e \right )} \log {\left (x \right )} + \frac {\operatorname {Li}_{2}\left (\frac {d e^{i \pi }}{e x^{2}}\right )}{2} & \text {for}\: \left |{x}\right | < 1 \\- \log {\left (e \right )} \log {\left (\frac {1}{x} \right )} + \frac {\operatorname {Li}_{2}\left (\frac {d e^{i \pi }}{e x^{2}}\right )}{2} & \text {for}\: \frac {1}{\left |{x}\right |} < 1 \\- {G_{2, 2}^{2, 0}\left (\begin {matrix} & 1, 1 \\0, 0 & \end {matrix} \middle | {x} \right )} \log {\left (e \right )} + {G_{2, 2}^{0, 2}\left (\begin {matrix} 1, 1 & \\ & 0, 0 \end {matrix} \middle | {x} \right )} \log {\left (e \right )} + \frac {\operatorname {Li}_{2}\left (\frac {d e^{i \pi }}{e x^{2}}\right )}{2} & \text {otherwise} \end {cases}}{d} & \text {otherwise} \end {cases}\right )}{2 d^{2}} - \frac {b \left (\begin {cases} \frac {1}{e x^{2}} & \text {for}\: d = 0 \\\frac {\log {\left (\frac {d}{x^{2}} + e \right )}}{d} & \text {otherwise} \end {cases}\right ) \log {\left (c x^{n} \right )}}{2 d^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {a+b\,\ln \left (c\,x^n\right )}{x\,{\left (e\,x^2+d\right )}^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________